package com.agg.core.base.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 查询，通用其他条件
 */
public class ExtDTO implements Serializable {
    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;

    /**
     * 关键词
     */
    private String keyword;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endTime;

    /**
     * 字段：查询或者导出字段
     */
    private List<ColumnDTO> columns;
    /**
     * id集合
     */
    private List<Long> ids;

    /**
     * 导出范围1，全部记录，2本页（根据分页，数据为根据传入参数查询结果），3选中（选中记录，以ids的查询结果为准）
     */
    private Integer exportScore;

    /**
     * 时间区间查询
     */
    private List<TimeSectionDTO> timeSections;

    /**
     * 自定义的查询
     */
    private String condition;
    /**
     * 按集合in查询
     */
    private Map<String,List<Object>> in;

    /**
     * 升序排序集合,为空则不要传参,或者orderByField=null,否则服务端会报错
     */
    private List<String> ascs;

    /**
     * 降序排序集合,为空则不要传参,或者orderByField=null,否则服务端会报错
     */
    private List<String> descs;


    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public List<ColumnDTO> getColumns() {
        return columns;
    }

    public void setColumns(List<ColumnDTO> columns) {
        this.columns = columns;
    }

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    public Integer getExportScore() {
        return exportScore;
    }

    public void setExportScore(Integer exportScore) {
        this.exportScore = exportScore;
    }

    public List<TimeSectionDTO> getTimeSections() {
        return timeSections;
    }

    public void setTimeSections(List<TimeSectionDTO> timeSections) {
        this.timeSections = timeSections;
    }

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public Map<String, List<Object>> getIn() {
        return in;
    }

    public void setIn(Map<String, List<Object>> in) {
        this.in = in;
    }

    public List<String> getAscs() {
        return ascs;
    }

    public void setAscs(List<String> ascs) {
        this.ascs = ascs;
    }

    public List<String> getDescs() {
        return descs;
    }

    public void setDescs(List<String> descs) {
        this.descs = descs;
    }
}
